(function() {
    angular.module('app').factory('tableTopShopService', tableTopShopService);

    tableTopShopService.$inject = ['util','$q'];

    function tableTopShopService(util,$q) {
        return {
            get: _get
            
        }

        function _get(catName) {
     
            var defer = $q.defer()

            util.$get({
                url: '/marketconditions/statistic/getCategoryStatisticTopShop.htm',
                data: {
                    catName: catName,
                    type: 'm'
                }
            }).then(function(resp){        

                defer.resolve(resp.value.shop);
            },function(err){
                defer.reject();
            });

            return defer.promise;
        }
        
     
    }
})();
